 |
|
 |
Subject: glibc detected *** :amgr : malloc(): memory corruption (fast) |
 |
 |
 |
Product Area: Domino Server |
 |
Technical Area: Application Development |
 |
Platform: Linux server |
 |
Release: 8.5.3 |
 |
Reproducible: Always |
 |
 |
 |
 |
While executing the below code, am getting *** glibc detected *** ./amgr: malloc(): memory corruption (fast) error, please suggest how to solve this issue.
Option Public
UseLSX "*lsxlc"
Use "common"
Option Declare
%Include "LSCONST.LSS"
Dim i As Integer
Dim empid As String
Dim vApprName As String
Dim readitem As Variant
Dim authitem As Variant
Dim RequesterName As Variant
Dim EXTview As NotesView
Dim EXTPOdoc As NotesDocument
Dim key As String
Dim numFound As Integer
Dim Acksrc As LCConnection
Dim AckRfcName As String
Dim wfid As String
Dim Field1 As LCField
Dim count As Integer
Dim db As NotesDatabase
Sub Initialize
On Error GoTo errorhandler
Dim session As New LCSession
Dim nsess As New NotesSession
Dim docCurr As NotesDocument
Dim apprdata As NotesDocument
Dim src As LCConnection
'Dim fldLstParms As New LCFieldList
'Dim fldLstResult As New LCFieldList
Dim RfcName As String
Dim doc As NotesDocument
Dim applevel As String
Dim numFound As string
Dim index As Long
'=====================================================================
'Declare objects for working with the SAP Connector result set
Dim fldLstParms As New LCFieldList
Dim M_PR_WFID As LCfield
Dim M_PR_itemNo As LCfield
Dim M_PR_qty As LCfield
Dim M_PR_unit As LCfield
Dim M_PR_plant As LCfield
Dim M_PR_storageLocation As LCfield
Dim M_PR_valuation As LCfield
Dim M_PR_materialCode As LCfield
Dim M_PR_catofDeliveryDate As LCfield
Dim M_PR_deliveryDate As LCfield
Dim M_PR_materialGrp As LCfield
Dim M_PR_requisitioner As LCfield
Dim M_PR_trackingNo As LCfield
Dim M_PR_VendorName As LCfield
Dim M_PR_VendorCode As LCfield
'Create Approver master
Dim M_PRApproverLevel As LCfield
Dim M_PRApprName As LCfield
Dim M_PRApproverEmpID As LCfield
Dim M_PRApproverEmail As LCfield
Dim M_PRApproverCode As LCfield
'=====================================================================
Set db = nsess.CurrentDatabase
RfcName ="ZGMM01I001_SEND_PRITEM_DATA_LN" 'RFC Name
'Getting Data using getSAPConnection
Call getSAPConnection(src,db,RfcName)
If src.IsConnected = True Then
'Print "Active server object"
End If
src.Metadata = "*"
'src.MapByName = True
numFound = src.Execute("", fldLstParms)
If (NumFound = 0) Then
'Print "No records returned by ECC"
Exit Sub
Else
Print "count : " numFound
'Exit Sub
End If
'If (src.Select (Nothing, 1, fldLstParms) <> 0) Then
'End If
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Set M_PR_WFID = fldlstParms.lookup("PRLISTWFID",index)
Set M_PR_itemNo = fldLstParms.lookup("PRLISTBNFPO",index)
Set M_PR_qty = fldLstParms.lookup("PRLISTMENGE",index)
Set M_PR_unit = fldLstParms.lookup("PRLISTMEINS",index)
Set M_PR_plant = fldLstParms.lookup("PRLISTWERKS",index)
Set M_PR_storageLocation = fldLstParms.lookup("PRLISTLGORT",index)
Set M_PR_valuation = fldLstParms.lookup("PRLISTBWTAR",index)
Set M_PR_materialCode = fldLstParms.lookup("PRLISTMATNR",index)
Set M_PR_catofDeliveryDate = fldLstParms.lookup("PRLISTLPEIN",index)
Set M_PR_deliveryDate = fldLstParms.lookup("PRLISTLFDAT",index)
Set M_PR_materialGrp = fldLstParms.lookup("PRLISTMATKL",index)
Set M_PR_requisitioner = fldLstParms.lookup("PRLISTAFNAM",index)
Set M_PR_trackingNo = fldLstParms.lookup("PRLISTBEDNR",index)
Set M_PR_VendorName = fldLstParms.lookup("PRLISTVENDOR_NAME",index)
Set M_PR_VendorCode = fldLstParms.lookup("PRLISTLIFNR",index)
Set M_PRApproverLevel = fldlstParms.lookup("PRRELWITEM",index)
Set M_PR_WFID = fldlstParms.lookup("PRRELWFID",index)
Set M_PRApprName = fldlstParms.lookup("PRRELENAME",index)
Set M_PRApproverEmpID = fldLstParms.lookup("PRRELEMPID",index)
Set M_PRApproverEmail = fldLstParms.lookup("PRRELEMAIL",index)
Set M_PRApproverCode = fldLstParms.lookup("PRRELRELCODE",index)
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
While (src.Fetch (fldLstParms) > 0) 'Get a document from our Notes result set
key=M_PR_WFID.text(0)
'Print "key= " & key
Set EXTview = db.GetView("Purchase Requisition")
Set EXTPOdoc = EXTview.Getdocumentbykey(key,true)
'Print "GetDocumentByKey Success"
If (EXTPOdoc Is Nothing) Then 'Check if PR exist or not
'Print "inside if"
Set docCurr = db.CreateDocument
docCurr.Form = "PRMaster"
'Print "Purchase requisition workflow ID is :" & M_PR_WFID.text(0)
If M_PR_WFID.text(0) <> "" Then
wfid=M_PR_WFID.text(0)
docCurr.M_PR_WFID = M_PR_WFID.text(0)
'Print "Purchase requisition workflow ID is :" & M_PR_WFID.text(0)
docCurr.M_PR_itemNo = M_PR_itemNo.text(0)
'Print "Purchase requisition Item No is :" & M_PR_itemNo.text(0)
docCurr.M_PR_qty = M_PR_qty.text(0)
'Print "Purchase requisition Quantity is :" & M_PR_qty.text(0)
docCurr.M_PR_unit = M_PR_unit.text(0)
'Print "Purchase requisition Unit is :" & M_PR_unit.text(0)
docCurr.M_PR_plant = M_PR_plant.text(0)
'Print "Purchase requisition Plant is :" & M_PR_plant.text(0)
docCurr.M_PR_storageLocation = M_PR_storageLocation.text(0)
'Print "Purchase requisition storage loaction is :" & M_PR_storageLocation.text(0)
docCurr.M_PR_valuation = M_PR_valuation.text(0)
'Print "Purchase requisition Valuation is :" & M_PR_valuation.text(0)
docCurr.M_PR_materialCode = M_PR_materialCode.text(0)
'Print "Purchase requisition MATERIAL CODE is :" & M_PR_materialCode.text(0)
docCurr.M_PR_catofDeliveryDate = M_PR_catofDeliveryDate.text(0)
'Print "Purchase requisition CATEGORY OF DELIVERY DATE is :" & M_PR_catofDeliveryDate.text(0)
docCurr.M_PR_deliveryDate = M_PR_deliveryDate.text(0)
'Print "Purchase requisition DELIVERY DATE is :" & M_PR_deliveryDate.text(0)
docCurr.M_PR_materialGrp = M_PR_materialGrp.text(0)
'Print "Purchase requisition MATERIAL GROUP is :" & M_PR_materialGrp.text(0)
docCurr.M_PR_requisitioner = M_PR_requisitioner.text(0)
'Print "Purchase requisition REQUISITIONER is :" & M_PR_requisitioner.text(0)
docCurr.M_PR_trackingNo = M_PR_trackingNo.text(0)
'Print "Purchase requisition TRACKINH NO is :" & M_PR_trackingNo.text(0)
docCurr.M_PR_VendorName = M_PR_VendorName.text(0)
'Print "Purchase requisition VENDOR NAME is :" & M_PR_VendorName.text(0)
docCurr.M_PR_VendorCode = M_PR_VendorCode.text(0)
'Print "Purchase requisition VENDOR CODE is :" & M_PR_VendorCode.text(0)
Call docCurr.Save(True,True)
End if
End if
'Create Approver master
'Set Field = fldlstParms.lookup("PRRELWFID")
key=M_PR_WFID.text(0)
'Print "WFID= " & key
Set EXTPOdoc = EXTview.GetDocumentByKey (key )
If (EXTPOdoc Is Nothing) Then 'Check if PO exist or not
Set apprdata = db.CreateDocument
apprdata.Form = "PRApproverMaster"
'Print "WITEM= " & M_PRApproverLevel.text(0) & "PR Approver Level"
If M_PRApproverLevel.text(0) <> "" Then
'Print "inside if" & M_PRApproverLevel.text(0)
applevel= M_PRApproverLevel.text(0)
apprdata.M_PRApproverLevel=applevel
'Print "inside if" & M_PRApproverLevel.text(0)
apprdata.M_PR_WFID=M_PR_WFID.text(0)
apprdata.M_PRApprName=M_PRApprName.text(0)
apprdata.M_PRApproverEmpID= M_PRApproverEmpID.text(0)
apprdata.M_PRApproverEmail = M_PRApproverEmail.text(0)
apprdata.M_PRApproverCode = M_PRApproverCode.text(0)
Call apprdata.Save(True,True)
End If
%REM
If M_PR_WFID.text(0) <> "" Then
RfcName1 ="ZGMM01I001_UPDATE_PR_ACK" 'RFC Name
'=================================================================='
Print "~~~~~~~~((Getting Data using getSAPConnection))))"
Call getSAPConnection(src1,db,RfcName1)
If src1.IsConnected = True Then
Print "Active server object"
End If
'=================================================================='
src1.Metadata = "*"
Print wfid+" RFC Ack call"
number.text=wfid
Set fldLstParms1=New Lcfieldlist
Set fldLstResult1=New Lcfieldlist
Set field1 = fldLstParms1.Append ("IMPORTSWFID", LCTYPE_NUMERIC)
Print number.text+" RFC Ack call"
Call field1.Setnumeric(1,number)
src1.MapByName = True
Print "Success_MapByName_1"
count = src1.Call (fldLstParms1, 1, fldLstResult1)
Print "Report Success"
Call src1.Fetch(fldLstResult1,1,1)
'Print "VValue" & field1.text(0) & "is value"
Print "Success SAP-ACK" & CStr(count)
Print "Report Success"
End If
Set fldLstParms1=Nothing
Set fldLstResult1=Nothing
Call src1.Disconnect()
%END REM
End if
Wend
Call src.Disconnect()
Set fldLstParms = Nothing
'End if
'================================================================================
'Create PR in DB & mail send to Approver
Dim PRview As NotesView
Dim PRdoc As NotesDocument
Dim Appview As NotesView
Dim Appdoc As NotesDocument
Dim NewPRdoc As NotesDocument
Dim nm As String
Set PRview = db.getview("PR Master")
Set PRdoc = PRview.Getfirstdocument()
While Not PRdoc Is Nothing
Set Appview = db.getview("PR Approver Master")
Set Appdoc = Appview.Getfirstdocument()
i=0
Dim app As string
Set NewPRdoc = db.CreateDocument
NewPRdoc.Form = "Purchase Requisition"
'Create Approver list in PR form
While Not Appdoc Is Nothing
'Print PRdoc.M_PR_WFID(0)+ " Create PR:'WFID Mapping' " + Appdoc.M_PR_WFID(0)
If PRdoc.M_PR_WFID(0)= Appdoc.M_PR_WFID(0) Then
'Print "in if"
applevel=Appdoc.M_PRApproverLevel(0)
'Print "after"
'Print applevel+"dfgdfg "+i
If applevel=1 Then
NewPRdoc.PR_ApprCode=Appdoc.getitemvalue("M_PRApproverCode")(0)
NewPRdoc.PR_ApprName=Appdoc.getitemvalue("M_PRApprName")(0)
NewPRdoc.PR_ApprEmpID=Appdoc.getitemvalue("M_PRApproverEmpID")(0)
Else
nm=Appdoc.getitemvalue("M_PRApproverCode")(0)
app=Appdoc.getitemvalue("M_PRApprName")(0)
empid=Appdoc.getitemvalue("M_PRApproverEmpID")(0)
'Print nm + " " + app + " " + empid
Call NewPRdoc.replaceItemValue("PR_ApprCode_" & CStr(applevel-1) , nm)
Call NewPRdoc.replaceItemValue("PR_ApprName_" & CStr(applevel-1) , app)
Call NewPRdoc.replaceItemValue("PR_ApprEmpID_" & CStr(applevel-1),empid)
End If
i=i+1
End If
Set Appdoc = Appview.Getnextdocument(Appdoc)
Wend
NewPRdoc.PR_WFID =PRdoc.M_PR_WFID(0)
NewPRdoc.PR_itemNo=PRdoc.M_PR_itemNo(0)
NewPRdoc.PR_materialCode=PRdoc.M_PR_materialCode(0)
NewPRdoc.PR_qty=PRdoc.M_PR_qty(0)
NewPRdoc.PR_unit=PRdoc.M_PR_unit(0)
NewPRdoc.PR_plant=PRdoc.M_PR_plant(0)
NewPRdoc.PR_storageLocation=PRdoc.M_PR_storageLocation(0)
NewPRdoc.PR_valuation = PRdoc.M_PR_valuation(0)
NewPRdoc.PR_catofDeliveryDate=PRdoc.M_PR_catofDeliveryDate(0)
NewPRdoc.PR_deliveryDate = PRdoc.M_PR_deliveryDate(0)
NewPRdoc.PR_materialGrp=PRdoc.M_PR_materialGrp(0)
NewPRdoc.PR_requisitioner = PRdoc.M_PR_requisitioner(0)
NewPRdoc.PR_trackingNo=PRdoc.M_PR_trackingNo(0)
NewPRdoc.PR_blockedStatus = ""
NewPRdoc.PR_desc=PRdoc.M_PR_desc(0)
NewPRdoc.PR_vendorCode =PRdoc.M_PR_VendorCode(0)
NewPRdoc.PR_vendorName=PRdoc.M_PR_VendorName(0)
NewPRdoc.PR_ApprStatus = "Requires Approval"
NewPRdoc.PR_Status4D="Requires Approval"
'Call NewPRdoc.ComputeWithForm(False ,False )
'Print NewPRdoc.PR_Status4D(0)
vApprName=NewPRdoc.getitemvalue("PR_ApprName")(0)
Dim readerNames(0 To 1) As String
readerNames(0) = vApprName
readerNames(1) = "[Admin]"
Call NewPRdoc.Replaceitemvalue("Author", readerNames)
Call NewPRdoc.Replaceitemvalue("Reader",readerNames)
Set readitem=NewPRdoc.Getfirstitem("Reader")
Set authitem=NewPRdoc.Getfirstitem("Author")
readitem.Isreaders=True
authitem.Isauthors=True
'Print "Approver NM :" & NewPRdoc.PR_ApprName(0)
'RequesterName=NewPRdoc.getitemvalue("RequesterName")(0)
vApprName=NewPRdoc.getitemvalue("PR_ApprName")(0)
Call SendMailMemo(RequesterName,vApprName,"","","PR request - Your Approval Is Required","PR Workflow ID #" & NewPRdoc.PR_WFID(0) & " - " & " requires your approval " & ". Here is a link to the request. >>>",NewPRdoc)
Call NewPRdoc.Save(True,True)
Set PRdoc = PRview.getNextdocument(PRdoc)
Wend
Call AckPR(PRdoc,PRview,db)
'%END REM
'%REM
Dim vc As NotesViewEntryCollection
Set vc = PRview.GetAllUnreadEntries()
Call vc.Removeall(True)
Set vc = Appview.GetAllUnreadEntries()
Call vc.Removeall(True)
Print "Fetch PR Data Success"
errorhandler:
Dim Msg As String
Dim Msgcode As Long
Dim status As Integer
Dim result As String
If session.status <> LCSUCCESS Then
status = session.GetStatus(result, Msgcode, Msg)
'MessageBox Session.GetStatusText, 0, "The following Lotus Connector Error has occurred"
Print Session.GetStatusText
Print status
End If
MsgBox result
Resume Next
End Sub
%REM
Function AckPR
Description: Comments for Function
%END REM
Function AckPR(PRdoc As NotesDocument,PRview As NotesView,db As NotesDatabase)
Dim AckfldLstParms As New LCFieldList
Dim AckfldLstResult As New LCFieldList
Dim number As New Lcnumeric
AckRfcName ="ZGMM01I001_UPDATE_PR_ACK" 'RFC Name
'=================================================================='
'Print "~~~~~~~~((Getting Data using getSAPConnection))))"
Call getSAPConnection(Acksrc,db,AckRfcName)
If Acksrc.IsConnected = True Then
'Print "Active server object : 'ACK'"
End If
'=================================================================='
Acksrc.Metadata = "*"
Set PRdoc= PRview.Getfirstdocument()
While Not PRdoc Is Nothing
wfid=PRdoc.M_PR_WFID(0)
number.text=wfid
Set AckfldLstParms=New Lcfieldlist
Set AckfldLstResult=New Lcfieldlist
Set field1 = AckfldLstParms.Append ("IMPORTSWFID", LCTYPE_NUMERIC)
'Print number.text+" RFC Ack call"
Call field1.Setnumeric(1,number)
Acksrc.MapByName = True
'Print "Success_MapByName_1"
count = Acksrc.Call (AckfldLstParms, 1, AckfldLstResult)
'Print "Report Success"
Call Acksrc.Fetch(AckfldLstResult,1,1)
'Print "VValue" & field1.text(0) & "is value"
'Print "Success SAP-ACK" & CStr(count)
'Print "Report Success"
Set AckfldLstParms=Nothing
Set AckfldLstResult=Nothing
Set PRdoc=PRview.Getnextdocument(PRdoc)
Wend
Call Acksrc.Disconnect()
End Function
 
Feedback number WEBB8VEDYM created by ~Helga Kitooburoni on 06/19/2012

Status: Open
Comments: *** glibc detected *** /opt/ibm/lotus/notes/latest/linux/amgr: free(): invalid next size (fast): 0x081de748 ***
======= Backtrace: =========
/lib/libc.so.6[0xb56c6cb1]
/lib/libc.so.6(__libc_free+0x84)[0xb56c8314]
/opt/ibm/lotus/notes/latest/linux/libdcapi.so(LCMemFree+0x40)[0x99dc7372]
/opt/ibm/lotus/notes/latest/linux/sapu.dcx[0x9991ad44]
/opt/ibm/lotus/notes/latest/linux/sapu.dcx[0x99924533]
/opt/ibm/lotus/notes/latest/linux/sapu.dcx(LCXFetch+0xf4)[0x9991ba1f]
/opt/ibm/lotus/notes/latest/linux/libdcapi.so(LCConnectionFetch+0x31f)[0x99dedc19]
/opt/ibm/lotus/notes/latest/linux/liblsxlc.so[0x9993cbd0]
/opt/ibm/lotus/notes/latest/linux/liblsxlc.so(LSXClassControl+0x1e7)[0x99945847]
/opt/ibm/lotus/notes/latest/linux/liblsxlc.so[0x9993a8cd]
/opt/ibm/lotus/notes/latest/linux/libnotes.so[0xb6f9c368]
/opt/ibm/lotus/notes/latest/linux/libnotes.so[0xb6fcc420]
/opt/ibm/lotus/notes/latest/linux/libnotes.so[0xb70149ec]
/opt/ibm/lotus/notes/latest/linux/libnotes.so[0xb7014ab5]
/opt/ibm/lotus/notes/latest/linux/libnotes.so[0xb701b78b]
/opt/ibm/lotus/notes/latest/linux/libnotes.so[0xb701d9a3]
/opt/ibm/lotus/notes/latest/linux/libnotes.so[0xb6f8ec99]
/opt/ibm/lotus/notes/latest/linux/libnotes.so(_ZN9LSIThread3RunEmi+0x81)[0xb6f5c22b]
/opt/ibm/lotus/notes/latest/linux/libnotes.so[0xb6f5c410]
/opt/ibm/lotus/notes/latest/linux/libnotes.so(_ZN9LSIThread15RunToCompletionEmi+0x1fa)[0xb6f5cab0]
/opt/ibm/lotus/notes/latest/linux/libnotes.so(_ZN12CLSIDocument9RunScriptEjsPcsmm+0x435)[0xb6f58b3b]
/opt/ibm/lotus/notes/latest/linux/libnotes.so[0xb6eb852a]
/opt/ibm/lotus/notes/latest/linux/libnotes.so(_ZN10CRawAction3RunEP13CDefActionCtxjPm+0x61)[0xb6ea1675]
/opt/ibm/lotus/notes/latest/linux/libnotes.so(_ZN10CRawAction7ExecuteEP13CDefActionCtx+0x161)[0xb6ea290b]
/opt/ibm/lotus/notes/latest/linux/libnotes.so[0xb6ea66a4]
/opt/ibm/lotus/notes/latest/linux/libnotes.so(_ZN10CAssistant3RunEP21tagASSISTRUNCTXSTRUCT+0x160e)[0xb6eb1162]
/opt/ibm/lotus/notes/latest/linux/amgr(RunTask+0xb52)[0x8055112]
/opt/ibm/lotus/notes/latest/linux/amgr(ProcessRunMessage+0x6f)[0x80555a5]
/opt/ibm/lotus/notes/latest/linux/amgr(ProcessMessage+0x5f)[0x8055685]
/opt/ibm/lotus/notes/latest/linux/amgr(ExecutiveMain+0xf9)[0x80558b7]
/opt/ibm/lotus/notes/latest/linux/amgr(AddInMain+0x2b5)[0x805c4b7]
/opt/ibm/lotus/notes/latest/linux/amgr(NotesMain+0x55)[0x805fead]
/opt/ibm/lotus/notes/latest/linux/amgr(main+0x112)[0x805fff2]
/lib/libc.so.6(__libc_start_main+0xdc)[0xb567887c]
/opt/ibm/lotus/notes/latest/linux/amgr(__gxx_personality_v0+0x12d)[0x8050401]
======= Memory map: ========
08048000-08063000 r-xp 00000000 68:02 96697 /opt/ibm/lotus/notes/85030/linux/amgr
08063000-08064000 rwxp 0001b000 68:02 96697 /opt/ibm/lotus/notes/85030/linux/amgr
08064000-081e3000 rwxp 08064000 00:00 0 [heap]
98000000-98021000 rwxp 98000000 00:00 0
98021000-98100000 ---p 98021000 00:00 0
981f5000-9831e000 rwxp 981f5000 00:00 0
9831e000-98b2d000 r-xp 00000000 68:02 94206 /opt/ibm/lotus/notes/85030/linux/libicudata.so.26
98b2d000-98b32000 rwxp 0080e000 68:02 94206 /opt/ibm/lotus/notes/85030/linux/libicudata.so.26
98b32000-98be0000 r-xp 00000000 68:02 95263 /opt/ibm/lotus/notes/85030/linux/libicuuc.so.26
98be0000-98bfc000 rwxp 000ad000 68:02 95263 /opt/ibm/lotus/notes/85030/linux/libicuuc.so.26
98bfc000-991b5000 rwxp 98bfc000 00:00 0
991b5000-991ef000 r-xp 00000000 68:02 45294 /usr/lib/libstdc++-3-libc6.2-2-2.10.0.so
991ef000-99200000 rwxp 00039000 68:02 45294 /usr/lib/libstdc++-3-libc6.2-2-2.10.0.so
99200000-99202000 rwxp 99200000 00:00 0
99202000-9924f000 r-xp 00000000 68:02 95265 /opt/ibm/lotus/notes/85030/linux/libsapucum.so
9924f000-99258000 rwxp 0004c000 68:02 95265 /opt/ibm/lotus/notes/85030/linux/libsapucum.so
99258000-99292000 rwxp 99258000 00:00 0
99292000-99744000 r-xp 00000000 68:02 95264 /opt/ibm/lotus/notes/85030/linux/librfcum.so
99744000-997f7000 rwxp 004b1000 68:02 95264 /opt/ibm/lotus/notes/85030/linux/librfcum.so
997f7000-99917000 rwxp 997f7000 00:00 0
99917000-9992f000 r-xp 00[04730:00081-2585205664] 06/19/2012 15:56:37 Opened session for Darshan Patel/tritondevdc (Release 8.5.3)

|
|  |
|